package com.briup.smartcity.service.impl;

import com.briup.smartcity.bean.BaseLog;
import com.briup.smartcity.bean.Carousel;
import com.briup.smartcity.exception.ServiceException;
import com.briup.smartcity.mapper.BaseLogMapper;
import com.briup.smartcity.mapper.extend.BaseLogExtendMapper;
import com.briup.smartcity.service.IBaseLogService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class BaseLogServiceImpl implements IBaseLogService {
    @Autowired
    private BaseLogExtendMapper extendMapper;
    @Override
    public PageInfo<BaseLog> pageQuery(int pageNum, int pageSize) throws ServiceException {
        PageHelper.startPage(pageNum,pageSize,true);
        List<BaseLog> list =  extendMapper.findYes();
        PageInfo<BaseLog> info = new PageInfo<>(list);
        return new PageInfo<>(list);
        //return null;
    }

    @Override
    public void AddbaseLog(BaseLog baseLog) throws ServiceException {

    }
}
